// i.d(t, { Z: () => InteractionmodeData })

import interactiveEnum, { deviceList } from "../enum/interactive.enum"
import Data from "../object/Data"

export default class InteractionmodeData extends Data {
  _source: string
  _mode: string
  constructor() {
    super(...arguments)
    this.name = "interaction"
    this._source = InteractionmodeData.defaultSource
    this._mode = InteractionmodeData.defaultMode
  }
  static get defaultMode() {
    return deviceList.Desktop
  }
  static get defaultSource() {
    return interactiveEnum.None
  }
  get mode() {
    return this._mode
  }
  get source() {
    return this._source
  }
  updateSource(e: string) {
    this._source = e
  }
  updateMode(e: string) {
    this._mode = e
  }
  hasController(e = this.mode) {
    return e === deviceList.VrWithController || e === deviceList.VrWithTrackedController
  }
  isVR(e = this.mode) {
    return e === deviceList.VrOrientOnly || e === deviceList.VrWithController || e === deviceList.VrWithTrackedController
  }
  isMobile(e = this.mode) {
    return e === deviceList.Mobile
  }
}
